import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: () => import('@/views/Home.vue')
  },
  {
    path: '/pro/list',
    component: () => import('@/views/pro/list.vue')
  },
  {
    path: '/pro/select',
    component: () => import('@/views/pro/select.vue')
  },
  {
    path: '/pro/seckill',
    component: () => import('@/views/pro/seckilllist.vue')
  },
  {
    path: '/pro/recommend',
    component: () => import('@/views/pro/recommendlist.vue')
  },
  {
    path: '/user/list',
    component: () => import('@/views/user/list.vue')
  },
  {
    path: '/user/admin',
    component: () => import('@/views/user/admin.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
